package com.ygxsk.carhome.utils;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.blankj.utilcode.util.ActivityUtils;
import com.blankj.utilcode.util.ColorUtils;
import com.blankj.utilcode.util.SpanUtils;
import com.blankj.utilcode.util.StringUtils;
import com.flyco.roundview.RoundTextView;
import com.tencent.mmkv.MMKV;
import com.ygxsk.carhome.R;
import com.ygxsk.carhome.constant.ConstantSign;
import com.ygxsk.carhome.constant.ExtraKey;
import com.ygxsk.carhome.constant.ExtraValue;
import com.ygxsk.carhome.enumwrap.CustomerStateType;
import com.ygxsk.carhome.enumwrap.EvaluteCarEstimateType;
import com.ygxsk.carhome.enumwrap.EvalutePriceType;
import com.ygxsk.carhome.enumwrap.EvaluteWadeLevel;
import com.ygxsk.carhome.enumwrap.LeadCarStepStatus;
import com.ygxsk.carhome.enumwrap.LeadGender;
import com.ygxsk.carhome.enumwrap.SmartGoHasFee;
import com.ygxsk.carhome.enumwrap.SmartGoIsPayment;
import com.ygxsk.carhome.listener.Delivery;
import com.ygxsk.carhome.response.CustomerStateTypeInfo;
import com.ygxsk.carhome.response.EvaluatePriceTypeInfo;
import com.ygxsk.carhome.response.EvaluateWadeInfo;
import com.ygxsk.carhome.response.LeadsFollowUpInfoBean;
import com.ygxsk.carhome.response.LeadsGenderInfoBean;
import com.ygxsk.carhome.ui.usercenter.WebViewAboriginalActivity;
import com.ygxsk.carhome.ui.usercenter.WebViewDetailActivity;
import com.ygxsk.carhome.ui.usercenter.WebViewNormalActivity;
import com.ygxsk.carhome.views.picker.NomalCustomBean;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * @date 2018/3/30 0030
 * @auther itchenqi
 * @description 父类布局的容器类
 */
public class ViewUitls {

    public static void LoadingGone(FrameLayout loading) {

        //这个正常不会报错
        if (loading != null) {
            if (loading.getVisibility() == View.VISIBLE) {
                loading.setVisibility(View.GONE);
            }
        }

    }

    public static void LoadingVisible(FrameLayout loading) {

        //不会报错
        if (loading != null) {

            if (loading.getVisibility() == View.GONE) {

                //LogUtils.d("itchen---->loading.getVisibility() == View.GONE,那么即将展示");

                loading.setVisibility(View.VISIBLE);

            } else {
                //LogUtils.d("itchen---->loading.getVisibility() 是隐藏的");
            }
        }
    }


    public static TextView getNo_data_one(FrameLayout loading) {
        if (loading != null) {
            TextView no_data_one = (TextView) loading.findViewById(R.id.no_data_one);
            return no_data_one;
        }
        return null;
    }

    //2018年02月06日重试按钮不要了
	/*public static Button getButtonTryAgain(FrameLayout loading) {
		Button buttonTryAgain = (Button) loading.findViewById(R.id.buttonTryAgain);
		return buttonTryAgain;
	}*/

    // _______________________________________________________________________________________________________

    /**
     * 主要是处理网络连接失败的情况
     */
    public static RelativeLayout getLayoutNoData(FrameLayout loading) {

        if (loading != null) {

            RelativeLayout layoutNullData = (RelativeLayout) loading.findViewById(R.id.layoutnodata);
            if (layoutNullData.getVisibility() == View.VISIBLE) {
                layoutNullData.setVisibility(View.GONE);
            }

            return layoutNullData;
        }

        return null;
    }

    /**
     * 主要是处理数据异常的
     */
    public static RelativeLayout getLayoutNullData(FrameLayout loading) {

        RelativeLayout layoutNullData = (RelativeLayout) loading.findViewById(R.id.layoutnulldata);
        if (layoutNullData.getVisibility() == View.VISIBLE) {
            layoutNullData.setVisibility(View.GONE);
        }

        return layoutNullData;
    }

    public static TextView getTextViewErrorNull(FrameLayout loading) {

        TextView textViewErrorNull = (TextView) loading.findViewById(R.id.textViewErrorNull);
        return textViewErrorNull;

    }

    public static ImageView getImageViewErrorNull(FrameLayout loading) {

        ImageView imageViewErrorNull = (ImageView) loading.findViewById(R.id.imageViewErrorNull);

        return imageViewErrorNull;

    }

    //2018年01月21日添加内容
    public static <T extends View> T findViewById(Activity activity, int id) {
        //return (T) activity.findViewById(id);
        return activity.findViewById(id);
    }

    /**
     * 添加是否展示 图片信息 根据 文本的文字内容是否为空，
     * 这里是由于 用在2021-8-10 11:55:43 的业户信息 电话按钮根据 电话文本的展示来展示。
     */
    public static void method_showImageViewByTextView(TextView _textViewPhone, ImageView _imageViewPhone) {

        if (_textViewPhone != null) {

            if (!TextUtils.isEmpty(_textViewPhone.getText().toString())) {

                Delivery.getInstance().post(new Runnable() {

                    @Override
                    public void run() {

                        if (_imageViewPhone != null) {
                            _imageViewPhone.setVisibility(View.VISIBLE);
                        }

                    }
                });

            } else {

                Delivery.getInstance().post(new Runnable() {
                    @Override
                    public void run() {

                        if (_imageViewPhone != null) {
                            _imageViewPhone.setVisibility(View.INVISIBLE);
                        }

                    }
                });

            }

        }


    }


//    /**
//     * @param mErrorActivity
//     * @param _sessionErrorActivity
//     */
//    //定位权限的弹窗提示
//    //添加使用权限的一些声明弹窗内容。
//    public static void checkLocationAuthority(ErrorActivity mErrorActivity, Session _sessionErrorActivity) {
//
//        //判断用户是否授予定位的权限
//        //boolean isGrantedLocation = PermissionUtils.isGranted(Permission.ACCESS_FINE_LOCATION, //
//        //Permission.ACCESS_COARSE_LOCATION);
//
//        if (PermissionUtils.isGranted(
//                Permission.ACCESS_FINE_LOCATION, //
//                Permission.ACCESS_COARSE_LOCATION)) {
//
//            //如果已经授权了那么，直接执行定位和上传经纬度的信息。
//            //LogUtils.d("itchen---->已经授权了  定位 权限---就正常执行就行。");
//
//            //这个上传定位是后台自己上传的
//            mErrorActivity.handlerLocationAuthority();
//
//        } else {
//
//            //如下一整块代码
//
//            /*//如果用户已经授权了，那么这些都没用，不用再次弹窗了。
//            //如果用户没有授权，那么就执行这里
//
//            LogUtils.d("itchen---->没有授权  定位 权限---弹窗授权的弹窗");
//
//            //获取一个自定义的view的内容
//            LayoutInflater inflaterInCustom = (LayoutInflater) mErrorActivity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
//
//            View viewCustom = inflaterInCustom.inflate(R.layout.layoutlocationargeement, null);
//            //内容文本的内容
//            TextView textViewLocationArgeenMent = (TextView) viewCustom.findViewById(R.id.textviewlocationargeenment);
//            SpanUtils.with(textViewLocationArgeenMent).append("请您仔细阅读")//
//                    .append("《位置信息使用协议》")//
//                    .setClickSpan(ColorUtils.getColor(R.color.blue), true, new View.OnClickListener() {
//                        @Override
//                        public void onClick(View v) {
//
//                            LogUtils.d("itchen---->点击了 位置信息使用 协议");
//
//                            //CommUtils.methodLocationProtocol();
//
//                        }
//                    }).append("。您点击【同意】，即表示您已同意协议内容。我们将全力保障您的信息安全。").create();
//
//            //如果用户点击了一次取消，那末这次打开应用期间是不提示用户的。
//
//            //boolean isClickCancelButton = SPUtils.getInstance().getBoolean(ConstantApi.P_LOCATION_PERMISSION_POPUP_ISCLICK);
//            boolean isClickCancelButton = _sessionErrorActivity.isClickCancelInPermissionPopup();
//            LogUtils.d("itchen---->点击【取消授权】状态是---->" + isClickCancelButton);
//
//            //  itchen---->点击【取消授权】状态是---->false
//
//            if (!isClickCancelButton) {
//                //用户没有点击过【取消授权】，那么就继续弹窗。
//
//                new MaterialDialog.Builder(mErrorActivity)
//                        //.title("欢迎使用" + AppUtils.getAppName())//
//                        .title("位置信息使用协议")//
//                        .customView(viewCustom, true)//填充自定义View
//                        .positiveText("设置权限")//
//                        .positiveColor(ColorUtils.getColor(R.color.red_pressed))//
//                        .negativeText("位置使用协议")//
//                        .neutralText("不同意")//不同意也行
//                        .onPositive(new MaterialDialog.SingleButtonCallback() {//
//                            @Override
//                            public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
//
//                                //标记用户已经【同意】了用户隐私政策内容
//                                LogUtils.d("itchen----->用户点击了 同意 那么开始打开定位的 弹窗申请。");
//
//                                SPUtils.getInstance().put(ConstantApi.P_LOCATION_PERMISSION_POPUP_ISCLICK, false);
//
//                                //同意的话就可以 弹窗权限的弹窗内容,并且上传位置信息。
//                                //处理定位的授权
//                                mErrorActivity.handlerLocationAuthority();
//
//                            }
//                        })
//                        .onNegative(new MaterialDialog.SingleButtonCallback() {
//
//                            @Override
//                            public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
//
//                                //位置权限使用协议。
//                                CommUtils.methodBaiDuProtocol();
//
//                            }
//                        })
//                        .onNeutral(new MaterialDialog.SingleButtonCallback() {
//
//                            @Override
//                            public void onClick(@NonNull MaterialDialog dialog, @NonNull DialogAction which) {
//
//                                LogUtils.d("itchen--->用户点击了 取消授权。");
//
//                                //这个使用session也是可以的。
//                                //这里是使用了【不同意按钮】
//                                //SPUtils.getInstance().put(ConstantApi.P_LOCATION_PERMISSION_POPUP_ISCLICK, true);
//                                _sessionErrorActivity.setClickCancelInPermissionPopup(true);
//
//                            }
//
//                        }).cancelable(false).show();
//
//            } else {
//
//                //用户点击了【取消授权】那么就不做任何内容的设置。
//                LogUtils.d("itchen----->逻辑  走到了用户 点击过【取消授权】");
//
//            }*/
//
//        }
//
//    }


    /**
     * 单独获取隐私政策的弹窗的布局内容，因为现在2处通用，所以单独抽出
     */
    public static View getViewCustomForPrivacyAgreement(Context mContext) {

        //获取一个自定义的 view 内容
        LayoutInflater inflaterInCustom = (LayoutInflater) mContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        View viewCustom = inflaterInCustom.inflate(R.layout.layouttextsecrecyturl, null);

        //内部的文本内容
        TextView textViewOneTopSecrecy = (TextView) viewCustom.findViewById(R.id.textviewonetopsecrecy);

        String contentInside = "您点击【同意】,即表示您已阅读并同意以上条款。请您充分了解在使用本软件过程中我们可能收集、使用您的个人信息情形，" +
                "希望您着重关注：" + StringUtils.getString(R.string.testtabhuh) +
                "1：为了消息推送，我们采用友盟SDK，采集您的设备（IMEI/MAC/Android ID/IDFA/OpenUDID/GUID/IMSI 信息等。" + StringUtils.getString(R.string.testtabhuh) +
                "APP内【设置-关于我们】有【隐私政策】的常驻入口，我们将全力保障您的合法权益与信息安全,并将持续为您提供更优质的服务。";

        SpanUtils.with(textViewOneTopSecrecy).append("请您在使用产品前仔细阅读")//
                .append("《隐私政策》").setClickSpan(ColorUtils.getColor(R.color.bluepicker), true, new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {

                        if (MMKV.defaultMMKV().decodeBool(ConstantSign.P_SECRECYTURL_AGREE)) {
                            //LogUtils.d("itchen--点击《隐私政策》-用户 已经 点击【同意--隐私政策】");
                            methodSecrecytUrl(mContext);
                        } else {
                            //LogUtils.d("itchen--点击《隐私政策》-用户 没有 点击【同意--隐私政策】");
                            methodSecrecytUrl_loadLocal(mContext);
                        }

                    }
                }).append("及")//
                .append("《服务协议》").setClickSpan(ColorUtils.getColor(R.color.bluepicker), true, new View.OnClickListener() {
                    @Override
                    public void onClick(View v) {
                        //LogUtils.d("itchen---->点击了用户协议");
                        //依据用户有无点击【同意】隐私政策判断，如果没有点击同意，那么点击查看的就是本地的html内容，
                        if (MMKV.defaultMMKV().decodeBool(ConstantSign.P_SECRECYTURL_AGREE)) {
                            //LogUtils.d("itchen---点击《服务协议--用户 已经 点击【同意--隐私政策】");
                            methodAgreementUrl(mContext);//用户协议
                        } else {
                            //LogUtils.d("itchen---点击《服务协议》--用户 没有 点击【同意--隐私政策】");
                            methodAgreementUrl_loadLocal(mContext, ConstantSign.TEXTURL_USER_AGREEMENT);//用户协议
                        }

                    }
                }).append(contentInside)
                .create();

        return viewCustom;
    }


    /**
     * 用户协议的  这个应该是做成加载本地即可
     */
    public static void methodAgreementUrl_loadLocal(Context _context, String titleTop) {

        Bundle extra_bundle = new Bundle();
        extra_bundle.putInt(ExtraKey.EXTRA_JUMPFROM_WHERE, ExtraValue.WHAT_TEXTAGREEMENTURL_LOADLOCAL);

        Intent intentToAgree = new Intent(_context, WebViewAboriginalActivity.class);
        intentToAgree.putExtras(extra_bundle);

        _context.startActivity(intentToAgree);

    }

    /**
     * 用户协议 的通用方法
     */
    public static void methodAgreementUrl(Context _context) {

        Bundle extra_bundle = new Bundle();

        extra_bundle.putInt(ExtraKey.EXTRA_JUMPFROM_WHERE, ExtraValue.WHAT_TEXTAGREEMENTURL);

        Intent intentToAgree = new Intent(_context, WebViewAboriginalActivity.class);

        intentToAgree.putExtras(extra_bundle);

        _context.startActivity(intentToAgree);

    }


    /**
     * 用户隐私政策的 加载本地的方法 通用，只有在首次安装的时候才使用。
     */
    public static void methodSecrecytUrl_loadLocal(Context _context) {

        Bundle extra_bundle = new Bundle();
        extra_bundle.putInt(ExtraKey.EXTRA_JUMPFROM_WHERE, ExtraValue.WHAT_TEXTSECRECYTURL_LOADLOCAL);

        Intent intentToSecrecy = new Intent(_context, WebViewAboriginalActivity.class);
        intentToSecrecy.putExtras(extra_bundle);

        _context.startActivity(intentToSecrecy);

    }

    /**
     * 用户隐私政策的通用方法
     */
    public static void methodSecrecytUrl(Context _context) {

        Bundle extra_bundle = new Bundle();
        extra_bundle.putInt(ExtraKey.EXTRA_JUMPFROM_WHERE, ExtraValue.WHAT_TEXTSECRECYTURL);

        Intent intentToSecrecy = new Intent(_context, WebViewAboriginalActivity.class);
        intentToSecrecy.putExtras(extra_bundle);

        _context.startActivity(intentToSecrecy);
    }

//    public static void method_toWebView_childrenFirst(int _extraValue, ChildrenOutSideModuleFirst _childrenOutSideModuleFirst) {
//
//
//        if (!TextUtils.isEmpty(_childrenOutSideModuleFirst.getIsFrame())) {//是否是外链
//
////            Bundle extra_bundle = new Bundle();
////            //extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, ExtraValue.INDEXTZDY_PATH_QYX);//签约县
////            extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, _extraValue);//签约县
////            extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, _childrenInSideModuleSecond.getMenuName());//StringUtils.getString(R.string.toolbartitlebqyx)
////            ActivityUtils.startActivity(extra_bundle, WebViewNor malActivity.class);
//
//            if (TextUtils.equals(_childrenOutSideModuleFirst.getIsFrame(), IsFrameType.ISFRAME_YES.getValue())) {//是外链的内容，携带外链信息过去
//                //跳转到H5
//                Bundle extra_bundle = new Bundle();
//                extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, _extraValue);//签约县
//                extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, _childrenOutSideModuleFirst.getMenuName());//这是它的名字
//
//                if (!TextUtils.isEmpty(_childrenOutSideModuleFirst.getComponent())) {//正常携带，正常跳转
//
//                    extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, _childrenOutSideModuleFirst.getComponent());//它的链接
//                    ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
//
//                } else {
//
//                    ToastUtils.showShort(R.string.isframecomponentnull);//是否为外链的值内容为空
//                    //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, ApiService.agreementPageUrl + "?name=" + AppUtils.getAppName());//假数据的
//                    // TODO: 2023-03-17 测试阶段 放开访问
//                    //ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
//                }
//            } else {
//                ToastUtils.showShort(R.string.notisframe);
//            }
//
//        } else {
//
//            //提示
//            ToastUtils.showShort(R.string.isframenull);
//        }
//
//
//    }

//    /**
//     * 第一阶梯 外侧的跳转到 外链的判断
//     *
//     * @param childrenOutSideModuleFirst
//     */
//    public static void method_isFrame_childrenFirst(ChildrenOutSideModuleFirst childrenOutSideModuleFirst) {
//
//        if (!TextUtils.isEmpty(childrenOutSideModuleFirst.getIsFrame())) {
//
//            if (TextUtils.equals(childrenOutSideModuleFirst.getIsFrame(), IsFrameType.ISFRAME_YES.getValue())) {//是外链的内容，携带外链信息过去
//                //跳转到H5
//                Bundle extra_bundle = new Bundle();
//                extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, ExtraValue.ISFRAME_YES);//签约县
//                extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, childrenOutSideModuleFirst.getMenuName());//这是它的名字
//
//                if (!TextUtils.isEmpty(childrenOutSideModuleFirst.getComponent())) {//正常携带，正常跳转
//                    extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, childrenOutSideModuleFirst.getComponent());//它的链接
//                    ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
//                } else {
//                    ToastUtils.showShort(R.string.isframecomponentnull);//是否为外链的值内容为空
//                }
//            }
//
//        } else {
//            //提示
//            ToastUtils.showShort(R.string.isframenull);
//        }
//
//    }

//    /**
//     * 跳转到H5的外链
//     *
//     * @param _extraValue
//     * @param _childrenInSideModuleSecond
//     */
//    public static void method_toWebView_childrenSecond(int _extraValue, ChildrenInSideModuleSecond _childrenInSideModuleSecond) {
//
//        if (!TextUtils.isEmpty(_childrenInSideModuleSecond.getIsFrame())) {//是否是外链
//
////            Bundle extra_bundle = new Bundle();
////            //extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, ExtraValue.INDEXTZDY_PATH_QYX);//签约县
////            extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, _extraValue);//签约县
////            extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, _childrenInSideModuleSecond.getMenuName());//StringUtils.getString(R.string.toolbartitlebqyx)
////            ActivityUtils.startActivity(extra_bundle, WebViewNor malActivity.class);
//
//            if (TextUtils.equals(_childrenInSideModuleSecond.getIsFrame(), IsFrameType.ISFRAME_YES.getValue())) {//是外链的内容，携带外链信息过去
//
//                //跳转到H5
//                Bundle extra_bundle = new Bundle();
//                extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, _extraValue);//签约县
//                extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, _childrenInSideModuleSecond.getMenuName());//这是它的名字
//
//                if (!TextUtils.isEmpty(_childrenInSideModuleSecond.getComponent())) {//正常携带，正常跳转
//
////                    LogUtils.d(ConstantSign.LOGCAT_NOMAL + "component--值=>" + _childrenInSideModuleSecond.getComponent());
//
//                    if (_extraValue != ExtraValue.INDEXXJ_PATH_SGXT) {//不是深耕社区的
//                        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, _childrenInSideModuleSecond.getComponent());//它的链接
//                    } else {//是深耕社区的
//                        //http://workwx.hbgxbl.com/collect?companyType=gongxiao&userId=02353
//
//
//                        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL,//
//                                _childrenInSideModuleSecond.getComponent() + "?companyType=gongxiao&userId=" + MMKV.defaultMMKV().decodeString(ConstantSign.P_LOGIN_INFO_USERNAME));//它的链接
//
////                        LogUtils.d(ConstantSign.LOGCAT_NOMAL+"深耕社区的完整地址->"+_childrenInSideModuleSecond.getComponent()+"?companyType=gongxiao&userId="+MMKV.defaultMMKV().decodeString(ConstantSign.P_LOGIN_INFO_USERNAME));
//
//                    }
//
//                    ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
//
//                } else {
//
//                    ToastUtils.showShort(R.string.isframecomponentnull);//是否为外链的值内容为空
//                    //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, ApiService.agreementPageUrl + "?name=" + AppUtils.getAppName());//假数据的
//                    // TODO: 2023-03-17 测试阶段 放开访问
//                    //ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
//                }
//
//            } else {
//                ToastUtils.showShort(R.string.notisframe);
//            }
//
//        } else {
//
//            //提示
//            ToastUtils.showShort(R.string.isframenull);
//        }
//
//    }

//    /**
//     * 该页面的大模块跳转小模块判断是否为外链的
//     *
//     * @param childrenInSideModuleSecond
//     */
//    public static void method_isFrame_childrenSecond(ChildrenInSideModuleSecond childrenInSideModuleSecond) {
//
//        if (!TextUtils.isEmpty(childrenInSideModuleSecond.getIsFrame())) {
//
//            if (TextUtils.equals(childrenInSideModuleSecond.getIsFrame(), IsFrameType.ISFRAME_YES.getValue())) {//是外链的内容，携带外链信息过去
//                //跳转到H5
//                Bundle extra_bundle = new Bundle();
//                extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, ExtraValue.ISFRAME_YES);//
//                extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, childrenInSideModuleSecond.getMenuName());//这是它的名字
//
//                if (!TextUtils.isEmpty(childrenInSideModuleSecond.getComponent())) {//正常携带，正常跳转
//                    extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, childrenInSideModuleSecond.getComponent());//它的链接
//                    ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
//                } else {
//                    ToastUtils.showShort(R.string.isframecomponentnull);//是否为外链的值内容为空
//                }
//            }
//
//        } else {
//            //提示
//            ToastUtils.showShort(R.string.isframenull);
//        }
//
//    }

//    //2023-5-9 16:44:44 H5调整打开 右上角 按钮的 新开启一个webView；
//    public static void method_toWebView_OpenNew(String _loadUrl) {
//
//
//        Bundle extra_bundle = new Bundle();
//        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, homeTopMessage.getNoticeLabel());//这是它的名字,暂时用短的【消息标签】代替
//        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, _titleName);//这是它的名字,暂时用短的【消息标签】代替
//        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, _loadUrl);//它的链接,
//        extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, ExtraValue.WEBVIEWFLAG_OPEN_NEW_ONE_WEBVIEW);//它的标识内容
//
//        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_NOTICEID, _noticeId);//特殊的 专有携带 消息id
//        ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
//
//    }

//    public static void method_toWebView_OpenNew_intent(Activity activity, String _loadUrl) {
//
//        Bundle extra_bundle = new Bundle();
//        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, homeTopMessage.getNoticeLabel());//这是它的名字,暂时用短的【消息标签】代替
//        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, _titleName);//这是它的名字,暂时用短的【消息标签】代替
//        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, _loadUrl);//它的链接,
//        extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, ExtraValue.WEBVIEWFLAG_OPEN_NEW_ONE_WEBVIEW);//它的标识内容
//
//        Intent intent = new Intent();
//        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
//        intent.putExtras(extra_bundle);
//        intent.setClass(activity, WebViewNormalActivity.class);
//        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_NOTICEID, _noticeId);//特殊的 专有携带 消息id
//        //ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
//        ActivityUtils.startActivity(intent);
//
//    }

    /**
     * 通用的跳转到消息详情接口
     *
     * @param _titleName
     * @param _noticeId
     */
    public static void method_toWebView_notice(String _titleName, String _noticeId, String _loadUrl) {

        Bundle extra_bundle = new Bundle();
        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, homeTopMessage.getNoticeLabel());//这是它的名字,暂时用短的【消息标签】代替
        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, _titleName);//这是它的名字,暂时用短的【消息标签】代替
        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, _loadUrl);//它的链接,
        extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, ExtraValue.WEBVIEWFLAG_HOMETOP_NOTICE);//它的标识内容
        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_NOTICEID, _noticeId);//特殊的 专有携带 消息id

        ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);

    }

    //添加法大大的企业认证，然后打开法大大的认证页面
    public static void method_toWebView_signature(String _titleName, String _loadUrl) {

        Bundle extra_bundle = new Bundle();
        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, homeTopMessage.getNoticeLabel());//这是它的名字,暂时用短的【消息标签】代替
        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, _titleName);//这是它的名字,暂时用短的【消息标签】代替
        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, _loadUrl);//它的链接,
        extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, ExtraValue.WEBVIEW_FLAG_COMPANY_ENTERPRISE);//它的标识内容
//        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_NOTICEID, _noticeId);//特殊的 专有携带 消息id

//        ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
        ActivityUtils.startActivity(extra_bundle, WebViewDetailActivity.class);

    }

    /**
     * 点击图片之后就解析这一段js代码:点击查看大图的方法
     */
    public static void clickImageInWebView(float touchX, float touchY, com.tencent.smtt.sdk.WebView _webView) {
        //public static void clickImageInWebView(float touchX, float touchY, com.tencent.smtt.sdk.WebView _webView, String _requestCurrentLoadPgeUrl) {

        /*webView.loadUrl("javascript:(function(){" +
                "var objs = document.getElementsByTagName(\"img\"); " +
                "for(var i=0;i<objs.length;i++)  " +
                "{"
                + "    objs[i].onclick=function()  " +
                "    {  "
                + "        window.imagelistener.openImage(this.src);  " +//通过js代码找到标签为img的代码块，设置点击的监听方法与本地的openImage方法进行连接
                "    }  " +
                "}" +
                "})()");*/

        //通过触控的位置来获取图片URL
        /*String js = "javascript:(function(){" +
                "var  obj=document.elementFromPoint(" + touchX + "," + touchY + ");"
                + "if(obj.src!=null){" + " window.imageClick.openImage(obj.src);}" +
                "})()";*/

        /*String js = "javascript:(function(){" +
                "var  obj=document.elementFromPoint(" + touchX + "," + touchY + ");"
                + "if(obj.src!=null&&obj.nodeName == 'img'){" + " window.imageClick.openImage(obj.src);}" +
                "})()";*/

        //obj.nodeName.toLowerCase()

        //仅仅识别图片
        /*String js = "javascript:(function(){" +
                "var  obj=document.elementFromPoint(" + touchX + "," + touchY + ");"
                + "if(obj.src!=null&&obj.nodeName.toLowerCase() == 'img'){" + " window.imageClick.openImage(obj.src);}"
                + "if(obj.src!=null&&obj.nodeName.toLowerCase() == 'video'){" + " window.videoClick.openVideo(obj.src);}" +
                "})()";
         */

        //LogUtils.d("itchen----即将执行 查看大图的逻辑js调用-------");
        //obj.getAttribute('preview') != null && obj.getAttribute('preview') != undefined

        //原始代码内容：
        String js = "javascript:(function(){" +
                "var  obj=document.elementFromPoint(" + touchX + "," + touchY + ");"
                + "if((obj.src!=null&&obj.nodeName.toLowerCase() == 'img')&&(obj.getAttribute('preview') != null && obj.getAttribute('preview') != undefined)){" + " window.imageClick.openImage(obj.src);}"
                + "if(obj.getAttribute('src')&&obj.className == 'videoWrap'){" + " window.videoClick.openVideo(obj.getAttribute('src'));}" +
                "})()";

        //这种是多参数的js调用代码
        /*String js = "javascript:(function(){" +
                "var  obj=document.elementFromPoint(" + touchX + "," + touchY + ");"
                + "if(obj.src!=null&&obj.nodeName.toLowerCase() == 'img'){" + " window.imageClick.openImage(" + "obj.src" + "," + _requestCurrentLoadPgeUrl + ");" +
                "" + "}"
                + "if(obj.getAttribute('src')&&obj.className == 'videoWrap'){" + " window.videoClick.openVideo(obj.getAttribute('src'));}" +
                "})()";*/

        if (_webView != null) {
            _webView.loadUrl(js);
        }

    }


    /**
     * 点击图片之后就解析这一段js代码:点击查看大图的方法
     */
    public static void clickVideoInWebView(float touchX, float touchY, com.tencent.smtt.sdk.WebView _webView) {

        /*webView.loadUrl("javascript:(function(){" +
                "var objs = document.getElementsByTagName(\"img\"); " +
                "for(var i=0;i<objs.length;i++)  " +
                "{"
                + "    objs[i].onclick=function()  " +
                "    {  "
                + "        window.imagelistener.openImage(this.src);  " +//通过js代码找到标签为img的代码块，设置点击的监听方法与本地的openImage方法进行连接
                "    }  " +
                "}" +
                "})()");*/

        //通过触控的位置来获取图片URL
        /*String js = "javascript:(function(){" +
                "var  obj=document.elementFromPoint(" + touchX + "," + touchY + ");"
                + "if(obj.src!=null){" + " window.imageClick.openImage(obj.src);}" +
                "})()";*/

        /*String js = "javascript:(function(){" +
                "var  obj=document.elementFromPoint(" + touchX + "," + touchY + ");"
                + "if(obj.src!=null&&obj.nodeName == 'img'){" + " window.imageClick.openImage(obj.src);}" +
                "})()";*/

        //obj.nodeName.toLowerCase()

        //仅仅识别图片
        String js = "javascript:(function(){" +
                "var  obj=document.elementFromPoint(" + touchX + "," + touchY + ");"
                + "if(obj.src!=null&&obj.nodeName.toLowerCase() == 'video'){" + " window.videoClick.openVideo(obj.src);}" +
                "})()";

        if (_webView != null) {
            _webView.loadUrl(js);
        }

    }

    /**
     * @param _dataNomalList      即将排序的列表
     * @param _currentSelectNomal 当前选中的那条数据
     * @return
     */
    //对选中的内容重新排序
    public static ArrayList<NomalCustomBean> method_sort(ArrayList<NomalCustomBean> _dataNomalList, NomalCustomBean _currentSelectNomal) {

        //重新编辑。第一个值内容，为了下次的选中做处理；
        ArrayList<NomalCustomBean> tempAreaCompanyList = new ArrayList<>();

        if (_dataNomalList != null && !_dataNomalList.isEmpty()) {
            Iterator<NomalCustomBean> iterator = _dataNomalList.iterator();
            if (iterator != null) {
                while (iterator.hasNext()) {
                    NomalCustomBean item = iterator.next();
                    if (item != null) {
                        if (TextUtils.equals(_currentSelectNomal.getDictCode(), item.getDictCode())) {
                            tempAreaCompanyList.add(0, item);//放在第一条
                        } else {
                            tempAreaCompanyList.add(item);//顺序存放
                        }
                    }
                }
            }
        }

        return tempAreaCompanyList;

    }


    public static ArrayList<EvaluateWadeInfo> getCustomerStateTypesWadeCustom() {


//                STATE_HAS_SUREED(1,"已确认"),
//                STATE_HAS_DISPATCH(2,"已分配"),
//                STATE_HAS_CANCELED(3,"已取消"),
//                STATE_HAS_COMPLETED(4,"已完成"),
//                STATE_NOT_DISPATCH(5,"待分配");


        ArrayList<EvaluateWadeInfo> state_type_list = new ArrayList<EvaluateWadeInfo>();

        //在线评估
        EvaluateWadeInfo customerStateTypeInfo1 = new EvaluateWadeInfo();
        customerStateTypeInfo1.setDictCode(CustomerStateType.STATE_HAS_SUREED.getIndex());
        customerStateTypeInfo1.setDictLabel(CustomerStateType.STATE_HAS_SUREED.getValue());
        state_type_list.add(customerStateTypeInfo1);

//        EvaluateWadeInfo customerStateTypeInfo2 = new EvaluateWadeInfo();
//        customerStateTypeInfo2.setDictCode(CustomerStateType.STATE_HAS_DISPATCH.getIndex());
//        customerStateTypeInfo2.setDictLabel(CustomerStateType.STATE_HAS_DISPATCH.getValue());
//        state_type_list.add(customerStateTypeInfo2);

        EvaluateWadeInfo customerStateTypeInfo3 = new EvaluateWadeInfo();
        customerStateTypeInfo3.setDictCode(CustomerStateType.STATE_HAS_CANCELED.getIndex());
        customerStateTypeInfo3.setDictLabel(CustomerStateType.STATE_HAS_CANCELED.getValue());
        state_type_list.add(customerStateTypeInfo3);

        EvaluateWadeInfo customerStateTypeInfo4 = new EvaluateWadeInfo();
        customerStateTypeInfo4.setDictCode(CustomerStateType.STATE_HAS_COMPLETED_AND_INTO_STATION.getIndex());
        customerStateTypeInfo4.setDictLabel(CustomerStateType.STATE_HAS_COMPLETED_AND_INTO_STATION.getValue());
        state_type_list.add(customerStateTypeInfo4);

//        EvaluateWadeInfo customerStateTypeInfo5= new EvaluateWadeInfo();
//        customerStateTypeInfo5.setDictCode(CustomerStateType.STATE_NOT_DISPATCH.getIndex());
//        customerStateTypeInfo5.setDictLabel(CustomerStateType.STATE_NOT_DISPATCH.getValue());
//        state_type_list.add(customerStateTypeInfo5);


        return state_type_list;

    }

    //智能出门 是否产生费用
    public static ArrayList<EvaluateWadeInfo> getHasFees() {

        //"hasFee": 1, //是否产生费用:0：否；1：是
//        SmartGoHasFee
//                HASFEE_NO("0", "否"),
//                HASFEE_YES("1", "是");

        ArrayList<EvaluateWadeInfo> hasfee_list = new ArrayList<EvaluateWadeInfo>();

        EvaluateWadeInfo wadeInfoYes = new EvaluateWadeInfo();
        wadeInfoYes.setDictCode(SmartGoHasFee.HASFEE_YES.getIndex());
        wadeInfoYes.setDictLabel(SmartGoHasFee.HASFEE_YES.getValue());
        hasfee_list.add(wadeInfoYes);

        EvaluateWadeInfo wadeInfoNo = new EvaluateWadeInfo();
        wadeInfoNo.setDictCode(SmartGoHasFee.HASFEE_NO.getIndex());
        wadeInfoNo.setDictLabel(SmartGoHasFee.HASFEE_NO.getValue());
        hasfee_list.add(wadeInfoNo);

        return hasfee_list;

    }

    //智能出门 是否已缴费
    public static ArrayList<EvaluateWadeInfo> getIsPayments() {

//        SmartGoIsPayment {
//
//            //"isPayment": 0, //是否已缴费(0:否，1:是)
//            PAYMENT_NO("0", "否"),
//                    PAYMENT_YES("1", "是");

        ArrayList<EvaluateWadeInfo> isPayment_list = new ArrayList<EvaluateWadeInfo>();

        EvaluateWadeInfo wadeInfoYes = new EvaluateWadeInfo();
        wadeInfoYes.setDictCode(SmartGoIsPayment.PAYMENT_YES.getIndex());
        wadeInfoYes.setDictLabel(SmartGoIsPayment.PAYMENT_YES.getValue());
        isPayment_list.add(wadeInfoYes);

        EvaluateWadeInfo wadeInfoNo = new EvaluateWadeInfo();
        wadeInfoNo.setDictCode(SmartGoIsPayment.PAYMENT_NO.getIndex());
        wadeInfoNo.setDictLabel(SmartGoIsPayment.PAYMENT_NO.getValue());
        isPayment_list.add(wadeInfoNo);

        return isPayment_list;
    }

    //预约维保 客户的状态
    public static ArrayList<CustomerStateTypeInfo> getCustomerStateTypes() {


//                STATE_HAS_SUREED(1,"已确认"),
//                STATE_HAS_DISPATCH(2,"已分配"),
//                STATE_HAS_CANCELED(3,"已取消"),
//                STATE_HAS_COMPLETED(4,"已完成"),
//                STATE_NOT_DISPATCH(5,"待分配");


        ArrayList<CustomerStateTypeInfo> state_type_list = new ArrayList<CustomerStateTypeInfo>();

        //在线评估
        CustomerStateTypeInfo customerStateTypeInfo1 = new CustomerStateTypeInfo();
        customerStateTypeInfo1.setDictCode(CustomerStateType.STATE_HAS_SUREED.getIndex());
        customerStateTypeInfo1.setDictLabel(CustomerStateType.STATE_HAS_SUREED.getValue());
        state_type_list.add(customerStateTypeInfo1);

//        CustomerStateTypeInfo customerStateTypeInfo2 = new CustomerStateTypeInfo();
//        customerStateTypeInfo2.setDictCode(CustomerStateType.STATE_HAS_DISPATCH.getIndex());
//        customerStateTypeInfo2.setDictLabel(CustomerStateType.STATE_HAS_DISPATCH.getValue());
//        state_type_list.add(customerStateTypeInfo2);

        CustomerStateTypeInfo customerStateTypeInfo3 = new CustomerStateTypeInfo();
        customerStateTypeInfo3.setDictCode(CustomerStateType.STATE_HAS_CANCELED.getIndex());
        customerStateTypeInfo3.setDictLabel(CustomerStateType.STATE_HAS_CANCELED.getValue());
        state_type_list.add(customerStateTypeInfo3);

        CustomerStateTypeInfo customerStateTypeInfo4 = new CustomerStateTypeInfo();
        customerStateTypeInfo4.setDictCode(CustomerStateType.STATE_HAS_COMPLETED_AND_INTO_STATION.getIndex());
        customerStateTypeInfo4.setDictLabel(CustomerStateType.STATE_HAS_COMPLETED_AND_INTO_STATION.getValue());
        state_type_list.add(customerStateTypeInfo4);

//        CustomerStateTypeInfo customerStateTypeInfo5= new CustomerStateTypeInfo();
//        customerStateTypeInfo5.setDictCode(CustomerStateType.STATE_NOT_DISPATCH.getIndex());
//        customerStateTypeInfo5.setDictLabel(CustomerStateType.STATE_NOT_DISPATCH.getValue());
//        state_type_list.add(customerStateTypeInfo5);

        return state_type_list;

    }

    //智能出门-是否产生费用的选项
    public static ArrayList<NomalCustomBean> getHasFeesHistory() {

        ArrayList<NomalCustomBean> smart_go_hasfees_list = new ArrayList<NomalCustomBean>();

        //2024-2-5 15:24:15新增一个【全部】
        NomalCustomBean nomalCustomBeanAll = new NomalCustomBean();
        nomalCustomBeanAll.setDictCode(SmartGoHasFee.HASFEE_ALL.getIndex());
        nomalCustomBeanAll.setDictLabel(SmartGoHasFee.HASFEE_ALL.getValue());
        smart_go_hasfees_list.add(nomalCustomBeanAll);

        NomalCustomBean nomalCustomBeanYes = new NomalCustomBean();
        nomalCustomBeanYes.setDictCode(SmartGoHasFee.HASFEE_YES.getIndex());
        nomalCustomBeanYes.setDictLabel(SmartGoHasFee.HASFEE_YES.getValue());
        smart_go_hasfees_list.add(nomalCustomBeanYes);

        NomalCustomBean nomalCustomBeanNo = new NomalCustomBean();
        nomalCustomBeanNo.setDictCode(SmartGoHasFee.HASFEE_NO.getIndex());
        nomalCustomBeanNo.setDictLabel(SmartGoHasFee.HASFEE_NO.getValue());
        smart_go_hasfees_list.add(nomalCustomBeanNo);

        return smart_go_hasfees_list;
    }

    //智能出门-是否已缴费
    public static ArrayList<NomalCustomBean> getIsPaymentHistory() {

        ArrayList<NomalCustomBean> smart_go_isPayment_list = new ArrayList<NomalCustomBean>();

        NomalCustomBean nomalCustomBeanAll = new NomalCustomBean();
        nomalCustomBeanAll.setDictCode(SmartGoIsPayment.PAYMENT_ALL.getIndex());
        nomalCustomBeanAll.setDictLabel(SmartGoIsPayment.PAYMENT_ALL.getValue());
        smart_go_isPayment_list.add(nomalCustomBeanAll);

        NomalCustomBean nomalCustomBeanYes = new NomalCustomBean();
        nomalCustomBeanYes.setDictCode(SmartGoIsPayment.PAYMENT_YES.getIndex());
        nomalCustomBeanYes.setDictLabel(SmartGoIsPayment.PAYMENT_YES.getValue());
        smart_go_isPayment_list.add(nomalCustomBeanYes);

        NomalCustomBean nomalCustomBeanNo = new NomalCustomBean();
        nomalCustomBeanNo.setDictCode(SmartGoIsPayment.PAYMENT_NO.getIndex());
        nomalCustomBeanNo.setDictLabel(SmartGoIsPayment.PAYMENT_NO.getValue());
        smart_go_isPayment_list.add(nomalCustomBeanNo);

        return smart_go_isPayment_list;
    }

    //车辆评估的类型 来源类型
    public static ArrayList<NomalCustomBean> getEvaluateTypes() {

        ArrayList<NomalCustomBean> evaluate_type_list = new ArrayList<NomalCustomBean>();

        //2024年1月19日16:09:27 添加全部
        NomalCustomBean nomalCustomBeanAll = new NomalCustomBean();
        nomalCustomBeanAll.setDictCode(EvaluteCarEstimateType.ESTIMATE_TYPE_ALL.getIndex());
        nomalCustomBeanAll.setDictLabel(EvaluteCarEstimateType.ESTIMATE_TYPE_ALL.getValue());

        //在线评估
        NomalCustomBean nomalCustomBean0 = new NomalCustomBean();
        nomalCustomBean0.setDictCode(EvaluteCarEstimateType.ESTIMATE_TYPE_ONLINE.getIndex());
        nomalCustomBean0.setDictLabel(EvaluteCarEstimateType.ESTIMATE_TYPE_ONLINE.getValue());

        //预约评估
        NomalCustomBean nomalCustomBean1 = new NomalCustomBean();
        nomalCustomBean1.setDictCode(EvaluteCarEstimateType.ESTIMATE_TYPE_BOOKING.getIndex());
        nomalCustomBean1.setDictLabel(EvaluteCarEstimateType.ESTIMATE_TYPE_BOOKING.getValue());

        //上门评估
        NomalCustomBean nomalCustomBean2 = new NomalCustomBean();
        nomalCustomBean2.setDictCode(EvaluteCarEstimateType.ESTIMATE_TYPE_ONDOOR.getIndex());
        nomalCustomBean2.setDictLabel(EvaluteCarEstimateType.ESTIMATE_TYPE_ONDOOR.getValue());

        //到店评估
        NomalCustomBean nomalCustomBean3 = new NomalCustomBean();
        nomalCustomBean3.setDictCode(EvaluteCarEstimateType.ESTIMATE_TYPE_ONSTORE.getIndex());
        nomalCustomBean3.setDictLabel(EvaluteCarEstimateType.ESTIMATE_TYPE_ONSTORE.getValue());

        evaluate_type_list.add(nomalCustomBeanAll);
        evaluate_type_list.add(nomalCustomBean0);
        evaluate_type_list.add(nomalCustomBean1);
        evaluate_type_list.add(nomalCustomBean2);
        evaluate_type_list.add(nomalCustomBean3);

        return evaluate_type_list;
    }

    //车辆报价类型的数据填充
    public static ArrayList<EvaluatePriceTypeInfo> getPriceTypeInfoBeans() {

        ArrayList<EvaluatePriceTypeInfo> mDataResources_priceType = new ArrayList<>();

        EvaluatePriceTypeInfo evaluatePriceTypeInfo1 = new EvaluatePriceTypeInfo();
        evaluatePriceTypeInfo1.setDictCode(EvalutePriceType.PRICETYPE_ONE_SINGLE.getIndex());
        evaluatePriceTypeInfo1.setDictLabel(EvalutePriceType.PRICETYPE_ONE_SINGLE.getValue());

        EvaluatePriceTypeInfo evaluatePriceTypeInfo2 = new EvaluatePriceTypeInfo();
        evaluatePriceTypeInfo2.setDictCode(EvalutePriceType.PRICETYPE_TWO_RANGE.getIndex());
        evaluatePriceTypeInfo2.setDictLabel(EvalutePriceType.PRICETYPE_TWO_RANGE.getValue());

        mDataResources_priceType.add(evaluatePriceTypeInfo1);
        mDataResources_priceType.add(evaluatePriceTypeInfo2);

        return mDataResources_priceType;
    }

    //获取车辆涉水的预备数据列表
    public static ArrayList<EvaluateWadeInfo> getWadeInfoBeans() {

        ArrayList<EvaluateWadeInfo> mDataResources_wade = new ArrayList<>();

        EvaluateWadeInfo evaluateWadeInfo1 = new EvaluateWadeInfo();
        evaluateWadeInfo1.setDictCode(EvaluteWadeLevel.Level_1.getIndex());
        evaluateWadeInfo1.setDictLabel(EvaluteWadeLevel.Level_1.getValue());

        EvaluateWadeInfo evaluateWadeInfo2 = new EvaluateWadeInfo();
        evaluateWadeInfo2.setDictCode(EvaluteWadeLevel.Level_2.getIndex());
        evaluateWadeInfo2.setDictLabel(EvaluteWadeLevel.Level_2.getValue());

        EvaluateWadeInfo evaluateWadeInfo3 = new EvaluateWadeInfo();
        evaluateWadeInfo3.setDictCode(EvaluteWadeLevel.Level_3.getIndex());
        evaluateWadeInfo3.setDictLabel(EvaluteWadeLevel.Level_3.getValue());

        EvaluateWadeInfo evaluateWadeInfo4 = new EvaluateWadeInfo();
        evaluateWadeInfo4.setDictCode(EvaluteWadeLevel.Level_4.getIndex());
        evaluateWadeInfo4.setDictLabel(EvaluteWadeLevel.Level_4.getValue());

        EvaluateWadeInfo evaluateWadeInfo5 = new EvaluateWadeInfo();
        evaluateWadeInfo5.setDictCode(EvaluteWadeLevel.Level_5.getIndex());
        evaluateWadeInfo5.setDictLabel(EvaluteWadeLevel.Level_5.getValue());

        mDataResources_wade.add(evaluateWadeInfo1);
        mDataResources_wade.add(evaluateWadeInfo2);
        mDataResources_wade.add(evaluateWadeInfo3);
        mDataResources_wade.add(evaluateWadeInfo4);
        mDataResources_wade.add(evaluateWadeInfo5);


        return mDataResources_wade;
    }

    //填充 车辆的事故 固定选项
//    public static ArrayList<EvaluateProblemInfo> getProblemInfoBeans() {
//
//        ArrayList<EvaluateProblemInfo> mDataResources_problem = new ArrayList<>();
//
//        EvaluateProblemInfo evaluateProblemInfo1 = new EvaluateProblemInfo();
//        evaluateProblemInfo1.setDictCode(EvaluteProblem.PROBLEM_MILD.getIndex());
//        evaluateProblemInfo1.setDictLabel(EvaluteProblem.PROBLEM_MILD.getValue());
//
//        EvaluateProblemInfo evaluateProblemInfo2 = new EvaluateProblemInfo();
//        evaluateProblemInfo2.setDictCode(EvaluteProblem.PROBLEM_GENERALLY.getIndex());
//        evaluateProblemInfo2.setDictLabel(EvaluteProblem.PROBLEM_GENERALLY.getValue());
//
//        EvaluateProblemInfo evaluateProblemInfo3 = new EvaluateProblemInfo();
//        evaluateProblemInfo3.setDictCode(EvaluteProblem.PROBLEM_GREAT.getIndex());
//        evaluateProblemInfo3.setDictLabel(EvaluteProblem.PROBLEM_GREAT.getValue());
//
//        EvaluateProblemInfo evaluateProblemInfo4 = new EvaluateProblemInfo();
//        evaluateProblemInfo4.setDictCode(EvaluteProblem.PROBLEM_LARGE.getIndex());
//        evaluateProblemInfo4.setDictLabel(EvaluteProblem.PROBLEM_LARGE.getValue());
//
//        mDataResources_problem.add(evaluateProblemInfo1);
//        mDataResources_problem.add(evaluateProblemInfo2);
//        mDataResources_problem.add(evaluateProblemInfo3);
//        mDataResources_problem.add(evaluateProblemInfo4);
//
//        return mDataResources_problem;
//    }

    //获取性别的类型
    public static ArrayList<LeadsGenderInfoBean> getGenderTypes() {

        ArrayList<LeadsGenderInfoBean> mDataResources_genderType = new ArrayList<>();

        //性别的列表信息
        LeadsGenderInfoBean leadsGenderInfoBeanMen = new LeadsGenderInfoBean();
        leadsGenderInfoBeanMen.setTypeId(LeadGender.LEAD_GENDER_MEN.getIndex());
        leadsGenderInfoBeanMen.setName(LeadGender.LEAD_GENDER_MEN.getValue());

        LeadsGenderInfoBean leadsGenderInfoBeanWoMen = new LeadsGenderInfoBean();
        leadsGenderInfoBeanWoMen.setTypeId(LeadGender.LEAD_GENDER_WOMEN.getIndex());
        leadsGenderInfoBeanWoMen.setName(LeadGender.LEAD_GENDER_WOMEN.getValue());

        LeadsGenderInfoBean leadsGenderInfoBeanUnKonw = new LeadsGenderInfoBean();
        leadsGenderInfoBeanUnKonw.setTypeId(LeadGender.LEAD_GENDER_UNKNOW.getIndex());
        leadsGenderInfoBeanUnKonw.setName(LeadGender.LEAD_GENDER_UNKNOW.getValue());

        mDataResources_genderType.add(leadsGenderInfoBeanMen);
        mDataResources_genderType.add(leadsGenderInfoBeanWoMen);
        mDataResources_genderType.add(leadsGenderInfoBeanUnKonw);

        return mDataResources_genderType;

    }

    //填充 跟进状态的 外部唯一入口
    public static ArrayList<LeadsFollowUpInfoBean> getFollowUpInfoBeans() {

        ArrayList<LeadsFollowUpInfoBean> mDataResources_followUp = new ArrayList<>();

        LeadsFollowUpInfoBean leadsFollowUpInfoBean1 = new LeadsFollowUpInfoBean();
        leadsFollowUpInfoBean1.setDictCode(LeadCarStepStatus.LEAD_STEP_TO_BE_CONTACT.getIndex());
        leadsFollowUpInfoBean1.setDictLabel(LeadCarStepStatus.LEAD_STEP_TO_BE_CONTACT.getValue());

        LeadsFollowUpInfoBean leadsFollowUpInfoBean2 = new LeadsFollowUpInfoBean();
        leadsFollowUpInfoBean2.setDictCode(LeadCarStepStatus.LEAD_STEP_TO_INIT_CONTACT.getIndex());
        leadsFollowUpInfoBean2.setDictLabel(LeadCarStepStatus.LEAD_STEP_TO_INIT_CONTACT.getValue());

        LeadsFollowUpInfoBean leadsFollowUpInfoBean3 = new LeadsFollowUpInfoBean();
        leadsFollowUpInfoBean3.setDictCode(LeadCarStepStatus.LEAD_STEP_HAS_A_INTENT.getIndex());
        leadsFollowUpInfoBean3.setDictLabel(LeadCarStepStatus.LEAD_STEP_HAS_A_INTENT.getValue());

        LeadsFollowUpInfoBean leadsFollowUpInfoBean4 = new LeadsFollowUpInfoBean();
        leadsFollowUpInfoBean4.setDictCode(LeadCarStepStatus.LEAD_STEP_HAS_NO_INTENT.getIndex());
        leadsFollowUpInfoBean4.setDictLabel(LeadCarStepStatus.LEAD_STEP_HAS_NO_INTENT.getValue());

        LeadsFollowUpInfoBean leadsFollowUpInfoBean5 = new LeadsFollowUpInfoBean();
        leadsFollowUpInfoBean5.setDictCode(LeadCarStepStatus.LEAD_STEP_SUCCESS.getIndex());
        leadsFollowUpInfoBean5.setDictLabel(LeadCarStepStatus.LEAD_STEP_SUCCESS.getValue());

        LeadsFollowUpInfoBean leadsFollowUpInfoBean6 = new LeadsFollowUpInfoBean();
        leadsFollowUpInfoBean6.setDictCode(LeadCarStepStatus.LEAD_STEP_FAIL.getIndex());
        leadsFollowUpInfoBean6.setDictLabel(LeadCarStepStatus.LEAD_STEP_FAIL.getValue());

        LeadsFollowUpInfoBean leadsFollowUpInfoBean7 = new LeadsFollowUpInfoBean();
        leadsFollowUpInfoBean7.setDictCode(LeadCarStepStatus.LEAD_STEP_CANCEL_BOOKING.getIndex());
        leadsFollowUpInfoBean7.setDictLabel(LeadCarStepStatus.LEAD_STEP_CANCEL_BOOKING.getValue());

        mDataResources_followUp.add(leadsFollowUpInfoBean1);
        mDataResources_followUp.add(leadsFollowUpInfoBean2);
        mDataResources_followUp.add(leadsFollowUpInfoBean3);
        mDataResources_followUp.add(leadsFollowUpInfoBean4);
        mDataResources_followUp.add(leadsFollowUpInfoBean5);
        mDataResources_followUp.add(leadsFollowUpInfoBean6);
        mDataResources_followUp.add(leadsFollowUpInfoBean7);

        return mDataResources_followUp;
    }

    /**
     * 特殊 是进到一个新的页面，新跳转activity
     *
     * @param _loadUrl
     * @param _titleName
     */
    //2023-5-9 16:44:44 H5调整打开 右上角 按钮的 新开启一个webView；
    public static void method_toWebView_OpenNew(String _loadUrl, String _titleName) {


        Bundle extra_bundle = new Bundle();
        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, homeTopMessage.getNoticeLabel());//这是它的名字,暂时用短的【消息标签】代替
        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, _titleName);//这是它的名字,暂时用短的【消息标签】代替
        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, _loadUrl);//它的链接,
        extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, ExtraValue.WEBVIEWFLAG_OPEN_NEW_ONE_WEBVIEW);//它的标识内容

        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_NOTICEID, _noticeId);//特殊的 专有携带 消息id
//        ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
        ActivityUtils.startActivity(extra_bundle, WebViewDetailActivity.class);

    }

    public static void method_toWebView_OpenNew_intent(Activity activity, String _loadUrl) {

        Bundle extra_bundle = new Bundle();
        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, homeTopMessage.getNoticeLabel());//这是它的名字,暂时用短的【消息标签】代替
        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_TITLENAME, _titleName);//这是它的名字,暂时用短的【消息标签】代替
        extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_LOADURL, _loadUrl);//它的链接,
        extra_bundle.putInt(ExtraKey.EXTRA_WEBVIEW_FLAG, ExtraValue.WEBVIEWFLAG_OPEN_NEW_ONE_WEBVIEW);//它的标识内容

        Intent intent = new Intent();
        intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        intent.putExtras(extra_bundle);
        intent.setClass(activity, WebViewNormalActivity.class);
        //extra_bundle.putString(ExtraKey.EXTRA_WEBVIEW_NOTICEID, _noticeId);//特殊的 专有携带 消息id
        //ActivityUtils.startActivity(extra_bundle, WebViewNormalActivity.class);
        ActivityUtils.startActivity(intent);

    }

    //设置圆角标签的 显示或者隐藏;
    public static void method_roundText_tag_show_or_hide(RoundTextView roundTextView, String valueStr) {

        if (!TextUtils.isEmpty(valueStr)) {
            if (roundTextView != null) {
                roundTextView.setVisibility(View.VISIBLE);
            }
        } else {
            if (roundTextView != null) {
                roundTextView.setVisibility(View.GONE);
            }
        }

    }

}
